#ifndef __UTILS_H__
#define __UTILS_H__

#include <stdint.h>
#include <stdbool.h>

uint16_t NextZero(uint8_t* buf, uint16_t count, uint16_t* pos);
uint16_t NextOne(uint8_t* buf, uint16_t count, uint16_t* pos);
bool IsZero(uint8_t* buf, uint16_t count, uint16_t index);
bool IsOne(uint8_t* buf, uint16_t count, uint16_t index);
void SetZero(uint8_t* buf, uint16_t count, uint16_t index);
void SetOne(uint8_t* buf, uint16_t count, uint16_t index);
uint16_t OneCount(uint8_t* buf, uint16_t count);


#endif // __UTILS_H__
